Measuring #include interpretation duration

I had an idea to measure the interpretation time for #include of a reasonably large library using the following code:

int fromTick = getTickCount_
#include <myBigLibrary.inc>
int toTick = getTickCount_
print (toTick - fromTick)

When running this script, the output is produced in about 0.5 seconds. However, the difference in tick values is always 0.

 

As a result, I assume that the interpreter:

- scans the code for #includes

- interprets the #includes

- interprets the remainder of the script

 

Does anyone know of a way to measure the interpretation time for the #include?


Antonio__Norkus - Thu Dec 01 06:35:45 EST 2016

Re: Measuring #include interpretation duration
Mathias Mamsch - Thu Dec 01 09:24:59 EST 2016

int a = getTickCount_()
print checkDXL("#include <D:/temp/performance.dxl>")
int b = getTickCount_()
print "Interpretation time:" (b-a) " ms\n"

Regards, Mathias

Re: Measuring #include interpretation duration
Antonio__Norkus - Thu Dec 01 09:32:57 EST 2016

Mathias Mamsch - Thu Dec 01 09:24:59 EST 2016

int a = getTickCount_()
print checkDXL("#include <D:/temp/performance.dxl>")
int b = getTickCount_()
print "Interpretation time:" (b-a) " ms\n"

Regards, Mathias

Of course! Thanks Mathias.